//---------------------- Function
//functions and objects -- basics
//function declaration
function sum(a,b){
    // 2 + undefined
    // NaN
     //arguments -- array like object
    return a + b;

}
console.log(total); // undefined
console.log(count );//undefined and it is an error
var total = 10;//exectu
console.log(total);//10
//override, replace one with another

//over loading -- same function multiple times
sum(2,5);//7
sum(2,3,10,20,34);// 5, 69
sum(2);// 2

sum();//0



function sum(a,b){
    return a + b;
}

function sum(a,b,c ){
       var output = 0;

    console.log(a);
    //arguments its an object like an array
    //[1,2,3,4,5,6,7,8,9,10]
    //[2]
    for(var j = 0; j < arguments.length; j++){
       output = output +  arguments[j];// j = 0 --
        //output = output + 2
        //output = 2
    }

    return output;
}


sum(1,2,3,4,5,6,7,8,9,10);

var count = 200; // line 37 200 is assigned to count
console.log(count);//
var numbers = [1,2,3,4,5,6,7];

///

var person = {
    name : "madhu",
    age : 30
}

person.skills = ['javascript','jquery']





































function sub(a,b){
    return a - b;
}

